package com.castle.fortress.admin.study.exam.mapper;

import com.castle.fortress.admin.study.exam.dto.StudyExamDto;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.study.exam.entity.StudyExamEntity;
import java.util.Map;
import java.util.List;
/**
 * 试卷管理Mapper 接口
 *
 * @author castle
 * @since 2023-02-10
 */
public interface StudyExamMapper extends BaseMapper<StudyExamEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param studyExamEntity
    * @return
    */
    List<StudyExamEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("studyExamEntity") StudyExamEntity studyExamEntity,@Param("authorityParams") Map<String, Object> authorityParams);
    /**
    * 扩展信息记录总数
    * @param studyExamEntity
    * @return
    */
    Long extendsCount(@Param("studyExamEntity") StudyExamEntity studyExamEntity,@Param("authorityParams") Map<String, Object> authorityParams);

    /**
    * 试卷管理扩展详情
    * @param id 试卷管理id
    * @return
    */
    StudyExamEntity getByIdExtends(@Param("id")Long id);

    /**
     * 修改试卷状态
     * @param id
     * @param status
     */
    void updateStatus(@Param("id")Long id, @Param("status")Integer status);

    List<StudyExamEntity> unansweredList(@Param("map")Map<String, Long> pageMap,@Param("params") Map<String,Object> authorityParams);

    Long unansweredCount(@Param("params") Map<String,Object> authorityParams);

    List<StudyExamEntity> answeredExamsList(@Param("map")Map<String, Long> pageMap, @Param("params") Map<String, Object> authorityParams);

    Long answeredExamsCount(@Param("params")Map<String, Object> authorityParams);

    List<StudyExamEntity> endTheExamsList(@Param("map")Map<String, Long> pageMap, @Param("params") Map<String, Object> authorityParams);

    Long endTheExamsCount(@Param("params")Map<String, Object> authorityParams);

    StudyExamDto getByIdExamNum(@Param("id") Long id);
}
